<template>
  <div class="home">
    <tab />
    <listall v-if="$store.state.i == 0" />
    <listother v-else />
  </div>
</template>

<script>
import tab from "../components/Tab.vue";
import listall from "../components/Listall.vue";
import listother from "../components/Listother.vue";
export default {
  mounted() {
    this.$axios.get("data.json").then((res) => {
      this.$store.commit("setlist", res.data.goods);
    });
  },
  components: {
    tab,
    listall,
    listother,
  },
};
</script>
